extends ScrollContainer


func _ready() -> void:
	var diyushaonv = Card.new("地狱少女",100,100,"把攻击的敌人拉下地狱",load("res://assets/ui/dysn.jpeg"))
	var paojie = Card.new("御坂美琴",100,100,"使用电磁炮",load("res://assets/ui/ybmq.jpg"))
	var baijinheizi = Card.new("白井黑子",100,100,"会瞬间移动到敌人面前攻击",load("res://assets/ui/bjhz.jpg"))
	var oiia = Card.new("oiiaii猫",100,100,"旋转攻击敌人",load("res://assets/ui/oiia.webp"))
	var yinliu = Card.new("影流之主",100,100,"会分身3个移动攻击",load("res://assets/ui/ylzz.webp"))
	var dilei = Card.new("地雷",100,100,"3秒后准备好地雷",load("res://assets/ui/tdl.jpg")) 
	var shenshe = Card.new("神社",100,100,"每0.5s放出一个博丽灵梦",load("res://assets/ui/blss.jpg"))
	var dama = Card.new("退退退大妈",500,100,"敌人受到攻击后后退",load("res://assets/ui/ttt.jpg"))
	var cards = []
	cards.append(diyushaonv)
	cards.append(paojie)
	cards.append(baijinheizi)
	cards.append(oiia)
	cards.append(yinliu)
	cards.append(dilei)
	cards.append(shenshe)
	cards.append(dama)
	var x = 0
	for card in cards:
		var obj_card = load("res://object/Card.tscn")
		var card_node = obj_card.instantiate()
		card_node.my_init(card.title,card.attack,card.hp,card.info,card.texture)
		x+=64
		card_node.position.x +=x
		$Panel.add_child(card_node)
		
	pass
